package Listener;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class listener1 {
	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
	System.out.println("destroy");

	}

	@Override
	public void contextInitialized(ServletContextEvent servletcontextevent) {
	String initparam=	servletcontextevent.getServletContext().getInitParameter("initparam");
	servletcontextevent.getServletContext().setAttribute("username", "lisi");
   System.out.println("init="+initparam);
	}

}

